@@ -1,6 +1,12 @@
Revision history for Perl extension Catalyst::Model::CDBI.
-
-0.11
+0.12 Tue Jan 09 02:36:00
+ - Work around MRO problems in CDBI by massaging CDBI::__::Base's ISA
+ - Switch from NEXT to MRO::Compat
+ - Switch from Catalyst::Base to Catalyst::Component
+ - Fix RT#18197
+ - Add deprecation notice.
+
+0.11 Wed Nov 23 09:46:00 2005
- Throw an exception during startup if there is an error loading
tables.
@@ -1,13 +1,25 @@
-# http://module-build.sourceforge.net/META-spec.html
-#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
-name: Catalyst-Model-CDBI
-version: 0.11
-version_from: lib/Catalyst/Model/CDBI.pm
-installdirs: site
+--- #YAML:1.0
+name: Catalyst-Model-CDBI
+version: 0.12
+abstract: ~
+author:
+ - Sebastian Riedel (sri@oook.de)
+license: unknown
+distribution_type: module
+configure_requires:
+ ExtUtils::MakeMaker: 0
+build_requires:
+ ExtUtils::MakeMaker: 0
requires:
- Catalyst: 4.00
- Class::DBI: 0
- Class::DBI::Loader: 0.2
-
-distribution_type: module
-generated_by: ExtUtils::MakeMaker version 6.17
+ Catalyst: 4.00
+ Class::DBI: 0
+ Class::DBI::Loader: 0.2
+ MRO::Compat: 0
+no_index:
+ directory:
+ - t
+ - inc
+generated_by: ExtUtils::MakeMaker version 6.54
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.4.html
+ version: 1.4
@@ -5,6 +5,7 @@ WriteMakefile(
AUTHOR => 'Sebastian Riedel (sri@oook.de)',
PREREQ_PM => {
Catalyst => '4.00',
+ MRO::Compat => 0,
Class::DBI => 0,
Class::DBI::Loader => 0.20
},
@@ -2,6 +2,7 @@ package Catalyst::Helper::Model::CDBI;
use strict;
use Class::DBI::Loader;
+use Class::DBI;
use File::Spec;
=head1 NAME
@@ -1,17 +1,24 @@
package Catalyst::Model::CDBI;
+# work around CDBI being incompatible with C3 mro, due to both Ima::DBI and Class::DBI::__::Base
+# inheriting from Class::Data::Inheritable in an inconsistent order.
+BEGIN {
+ require Class::DBI;
+ @Class::DBI::__::Base::ISA = grep { $_ ne 'Class::Data::Inheritable' } @Class::DBI::__::Base::ISA;
+}
+
use strict;
-use base qw/Catalyst::Base Class::DBI/;
-use NEXT;
+use base qw/Catalyst::Component Class::DBI/;
+use MRO::Compat;
use Class::DBI::Loader;
-our $VERSION = '0.11';
+our $VERSION = '0.12';
__PACKAGE__->mk_accessors('loader');
=head1 NAME
-Catalyst::Model::CDBI - CDBI Model Class
+Catalyst::Model::CDBI - [DEPRECATED] CDBI Model Class
=head1 SYNOPSIS
@@ -42,7 +49,12 @@ Catalyst::Model::CDBI - CDBI Model Class
=head1 DESCRIPTION
This is the C<Class::DBI> model class. It's built on top of
-C<Class::DBI::Loader>.
+C<Class::DBI::Loader>. C<Class::DBI> is generally not used for new
+applications, with C<DBIx::Class> being preferred instead. As such
+this model is deprecated and (mostly) unmaintained.
+
+It is preserved here for older applications which still need it for
+backwards compatibility.
=head2 new
@@ -53,7 +65,7 @@ config. Also attempts to borg all the classes.
sub new {
my $class = shift;
- my $self = $class->NEXT::new( @_ );
+ my $self = $class->next::method( @_ );
my $c = shift;
$self->{namespace} ||= ref $self;
$self->{additional_base_classes} ||= ();
@@ -84,8 +96,17 @@ L<Catalyst>, L<Class::DBI> L<Class::DBI::Loader>
Sebastian Riedel, C<sri@cpan.org>
+=head1 CONTRIBUTORS
+
+mst: Matt S Trout C<mst@shadowcat.co.uk>
+
+Arathorn: Matthew Hodgson C<matthew@arasphere.net>
+
=head1 COPYRIGHT
+Copyright (c) 2005 - 2010 the Catalyst::Model::CDBI L</AUTHOR> and
+L</CONTRIBUTORS> as listed above.
+
This program is free software, you can redistribute it and/or modify it
under the same terms as Perl itself.
@@ -1,5 +1,8 @@
use strict;
-use Test::More tests => 2;
+use Test::More tests => 3;
BEGIN { use_ok('Catalyst::Model::CDBI') }
BEGIN { use_ok('Catalyst::Helper::Model::CDBI') }
+
+use MRO::Compat;
+ok(eval { mro::get_linear_isa('Catalyst::Model::CDBI'); 1 }, 'Linearise ok');